<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>What is zhis sha?</title>
<script type="text/javascript" src="../static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="../static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../static/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="../static/easyui/themes/icon.css">
<link rel="stylesheet" href="../static/easyui/themes/metro-red/easyui.css">

<style type="text/css">

</style>
<script type="text/javascript">

</script> 
</head>
<body>
<link rel="stylesheet" href="../static/zyc/css/skills-table.css?<%=Math.random()%>">
<link rel="stylesheet" href="../static/oyp/css/recruit_apply.css?<%=Math.random()%>">
   <script type="text/javascript">
   function jnxx_table(){
		//初始化表格
		$('#skillstable').datagrid({
		    url:'select_jnxx',
		    columns:[[
				{field:'JNXXID',width:166,title:'技能编号',align:'center'},
				{field:'JNXXNAME',width:166,title:'技能名称',align:'center'},
				{field:'CLSNAME',width:166,title:'所属证书',align:'center'},
				{field:'TYPEZLX',width:166,title:'证书类型',align:'center'}
		    ]],
		    toolbar:'#jineng_add',
		    pagination:true,
		    pageNumber:1,
		    pageSize:5,
		    pageList:[5,10,15]
		});
   }
		$(function(){
			jnxx_table();
			//+号按钮，窗口打开
			$("#jineng_add").click(function(){
				$("#jineng_add_win").window("open");
			})
			//提交按钮
			$("#jineng_xiangmutijiao").click(function(){
				//获取技能名称
				var jnxxname=$("#jineng_name").val();
				//获取所属证书
				var clsid=$("#jineng_sele option:selected").attr('id');
				if(jnxxname!=""){
					$.ajax({
						type : "post",
						url : 'jineng_add', //数据源地址
						data : {
							jnxxname:jnxxname,
							clsid:clsid
						},
						success : function(data) {
							jnxx_table();
						}
						
					})
					$("#jineng_add_win").window("close");
				}else if(jnxxname==""){
					alert("请输入技能 名称")
				}
			})
		});
	</script>
    <div class="skillstable_box">
<!--        <div class="topbox">
           <div class="sousuobox">
                 <span class="title_zhong text_style_title">技能</span>
                 <input type="text" style="width:180px;height:30px;font-size:20px;">
                 <input type="button" value="搜索" class="sousuoan">
              
           </div>
       </div> -->
       <div id="jineng_add_win" class="easyui-window" title="技能新增" style="width:500px;padding-top:5px;height:300px"
		    	data-options="closed:true,minimizable:false,maximizable:false,collapsible:false,resizable: false,draggable:false ">
		  	<div style="width:320px;margin:0px auto;margin-top:10px;margin-bottom:15px;">
		  		<span>技能名称：</span><input type="text" id="jineng_name"style="border-radius: 10px;">
		  	</div> 
		  	<div  style="width:320px;margin:0px auto;">
		  		<span>所属证书：</span>
				  	<select id="jineng_sele"style="border-radius: 10px;">
				  	<c:forEach items="${cls}" var="c">
				  		<option id="${c.CLSID}">${c.CLSNAME}</option>
				  	</c:forEach>	
				 </select>
		  	</div>
		  	<div class="jineng_box8">
				<button id="jineng_xiangmutijiao" style="margin-right: 15px;">
					<img src="../static/tyl/images/go.png">提交</button>
				<button id="jineng_quxiao">
					<img src="../static/tyl/images/cha.png">取消</button>
			</div>
	   </div>
       <div class="biaobox">
           <table id="skillstable" class="easyui-datagrid"
            data-options="width:1000,fitColumns:true,height:500">
           </table>
           	<div id="HuiYitb">
				<a id="jineng_add" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"></a>			
			</div>
       </div>
    </div>

    
</body>
</html>